<{include file="Public/top.html" }>
</head>
<body>
<div id="warpper">
    <div class="content">
        <div class="location">用户操作</div>
        <!-- 子导航 -->
        <{include file="./nav.html" }>

        <form method="post" class="ui-form" id="addManagerForm">
            <div class="filedSet">
                <div class="topic">用户信息</div>
                <div class="form-box border0 border-box">
                    <div class="ui-form-item" style="height:175px;">
                        <label class="ui-label">用户ID：</label>
                        <textarea class="ui-textarea" id="uid" name="uid" placeholder="11324,23,12"></textarea>
                        <span class="inline-block notes">多个用户<br>使用“,”分割</span><br>
                        <label class="ui-label" style="padding-left:120px; width:70px;">全员发送</label>
                        <input id="allUser" type="checkbox" value="1" name="all"/>
                    </div>
                    <div class="ui-form-item">
                        <label class="ui-label">标 题：</label>
                        <input type="text" class="ui-text" name="title" placeholder="系统消息" value="系统消息"/>
                    </div>
                    <div class="ui-form-item" style="height:140px;">
                        <label class="ui-label">用户通知：</label>
                        <textarea class="ui-textarea" name="content" placeholder="输入消息内容" required></textarea>
                    </div>
                    <div class="ui-form-item">
                        <label class="ui-label">地址：</label>
                        <input type="text" class="ui-text" name="link" placeholder="输入跳转地址"/>
                    </div>
                </div>
                <div class="integral_btn-group">
                    <input type="submit" value="提交" class="ui-button"/>
                </div>
            </div>
        </form>
    </div>
</div>

<{include file="Public/foot.html" }>
<script>
    var noticeEditURL = "<{u('User/sendMessage')}>";
    $(function(){
        $("form").submit(function () {
            $.getJSON(noticeEditURL,$(this).serialize(), function(data){
                if(data.status!=0){
                    layer.msg(data.msg);
                    return false;
                }else{
                    layer.msg(data.msg);
                    location.assign(location);
                }
            });
            return false;
        });
    });

    $('#allUser').on('ifChecked',function(){
        $('#uid').attr('disabled',true);
        $('#pointReduce').attr('disabled',true);

    }).on('ifUnchecked',function(){
        $('#uid').attr('disabled',false);
        $('#pointReduce').attr('disabled',false);
    });

</script>
</body>
</html>
